<%@ page import="hyl.ext.base.TokenFactory,hyl.ext.base.MyToken"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh">

<head>
<meta charset="UTF-8">
<title>找回密码</title>
<meta
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
	name="viewport" />
<!-- 全局变量 函数定义区 见top.jsp -->
<%@ include file="pub/top1.jsp"%>
<!-- 实例变量 函数定义区 -->



<style type="text/css">
* {
	margin: 0px;
	padding: 0px;
}

body {
	overflow: hidden;
	height: 100vh;
	display: flex;
	/* 将div对象设置为弹性盒子 */
	justify-content: center;
	/* 将div对象内部内容水平居中 */
	align-items: center;
	/* 将div对象内部内容垂直居中 */
}

/*第一个背景div*/
#Content {
	width: 272px;
	display: flex;
	/* 将div对象设置为弹性盒子 */
	justify-content: flex-start;
	flex-direction: column;
	/* 将div对象内部内容水平居中 */


}

h3 {
	font-size: 30px;
	font-weight: 700;
	color: #ffffff;
	font-family: Andalus;
	text-align: center;
	margin-bottom: 30px;
}

input.txt {
	width: 270px;
	height: 42px;
	color: #ffffff;
	background: rgba(45, 45, 45, .15);
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, .15);
	box-shadow: 0 2px 3px 0 rgba(0, 0, 0, .1) inset;
	-webkit-box-shadow: 0 2px 3px 0 rgba(0, 0, 0, .1) inset;
	-moz-box-shadow: 0 2px 3px 0 rgba(0, 0, 0, .1) inset;
	margin-bottom: 25px;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .1);
	text-indent: 10px;
}

input.but {
	background: #ef4300;
	width: 272px;
	height: 44px;
	box-shadow: 0 15px 30px 0 rgba(255, 255, 255, .25) inset, 0 2px 7px 0
		rgba(0, 0, 0, .2);
	-webkit-box-shadow: 0 15px 30px 0 rgba(255, 255, 255, .25) inset, 0 2px
		7px 0 rgba(0, 0, 0, .2);
	-moz-box-shadow: 0 15px 30px 0 rgba(255, 255, 255, .25) inset, 0 2px 7px
		0 rgba(0, 0, 0, .2);
	border: 0px;
	border-radius: 6px;
	color: #ffffff;
	font-size: 14px;
}

input:focus {
	outline: none;
	-webkit-box-shadow: 0 2px 3px 0 rgba(0, 0, 0, .1) inset, 0 2px 7px 0
		rgba(0, 0, 0, .2);
	-moz-box-shadow: 0 2px 3px 0 rgba(0, 0, 0, .1) inset, 0 2px 7px 0
		rgba(0, 0, 0, .2);
	box-shadow: 0 2px 3px 0 rgba(0, 0, 0, .1) inset, 0 2px 7px 0
		rgba(0, 0, 0, .2);
}

/*当input获取焦点的时候*/
input::-webkit-input-placeholder {
	color: #ffffff;
}

/*修改输入框默认输入文字颜色*/
#title {
	width: 270px;
	text-align: center
}
</style>
<link type="text/css" href="<%=basePath%>cssjs/layui/css/layui.css"
	rel="stylesheet">

<script src="<%=basePath%>cssjs/layui/layui.js"></script>
<script src="<%=basePath%>cssjs/jquery/zepto.min.js"></script>
<script src="<%=basePath%>cssjs/hyl/core/safe/md5.js"></script>
<style>
body {
	background-image: url("<%=basePath%>cssjs/login1/picture/1.jpg");
	background-repeat: no-repeat;
	/* 防止图片重复 */
	background-size: cover;
	/* 让图片铺满整个屏幕 */
}
</style>
</head>

<body>
	<div id="Content">
		<h3 id="title" style ="margin-bottom:80px">重置密码</h3>
		<form action="" method="post" target="_blank">
			<input type="text" placeholder="邮箱 " class="txt " id="邮箱"> <input
				type="password" placeholder="输入重置密码 " class="txt " id="密码">
			<input type="password" placeholder="重复输入密码验证 (和上方密码一致)" class="txt "
				id="密码2"> <input type="button" class="but " value="发送邮件重置密码"
				id="找回">
		</form>
	</div>



</body>

</html>
<script type="module">
	import "<%=basePath%>cssjs/hyl/core/fun.js";
	import "<%=basePath%>cssjs/Mm.js";

	HYL_URLS.URL_DAO_PUBLICKEY = BASEPATH.concat("l/publickey");
	HYL_URLS.URL_DAO_KEY = BASEPATH.concat("l/sm4key");
	HYL_URLS.URL_RSPADSS=BASEPATH.concat("l/resetpass_mail");

	var e能否提交 = false;

	function message(e) {
		layer.msg(e, { icon: 0, anim: 5, time: 800 }, function () {
			// layer.msg('提示框关闭后的回调');
		});
	}
	$(document).ready(function () {

		Mm.f准备(HYLSessionKey,HYL_URLS, () => {
			e能否提交 = true;
		});
		$("#找回").click(function () {
			if (!e能否提交) return;
			let umail = $("#邮箱").val(); 	
			let pass = $("#密码").val(); 	
			let pass2 = $("#密码2").val(); 	 
			Mm.f重置密码(umail,pass,pass2,
			data=> {message("密码重置邮件已经发送");}, e => {message(e)});
		});
		
	});


</script>